# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2SelectionLimits do
  @moduledoc """
  Limits for selection Field type.

  ## Attributes

  *   `listLimits` (*type:* `GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2ListLimits.t`, *default:* `nil`) - Limits for list-variant of a Field type.
  *   `maxChoices` (*type:* `integer()`, *default:* `nil`) - The max number of choices.
  *   `maxDeletedChoices` (*type:* `integer()`, *default:* `nil`) - Maximum number of deleted choices.
  *   `maxDisplayNameLength` (*type:* `integer()`, *default:* `nil`) - Maximum length for display name.
  *   `maxIdLength` (*type:* `integer()`, *default:* `nil`) - Maximum ID length for a selection options.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :listLimits =>
            GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2ListLimits.t() | nil,
          :maxChoices => integer() | nil,
          :maxDeletedChoices => integer() | nil,
          :maxDisplayNameLength => integer() | nil,
          :maxIdLength => integer() | nil
        }

  field(:listLimits, as: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2ListLimits)
  field(:maxChoices)
  field(:maxDeletedChoices)
  field(:maxDisplayNameLength)
  field(:maxIdLength)
end

defimpl Poison.Decoder, for: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2SelectionLimits do
  def decode(value, options) do
    GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2SelectionLimits.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.DriveLabels.V2.Model.GoogleAppsDriveLabelsV2SelectionLimits do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
